// src/features/auth/api.ts
import { AuthAPI } from '../../api/endpoints';

export const useAuthAPI = () => {
  const login = async (payload: LoginPayload) => {
    try {
      return await AuthAPI.login(payload);
    } catch (error) {
      // 模块特定错误处理
      throw new Error('Login failed');
    }
  };

  return { login };
};